package com.jmu.edu.IMApplication.net.bean;

import lombok.Data;

import java.io.Serializable;
import java.util.List;
import java.util.Objects;

/**
 * @TableName user
 */
@Data
public class User implements Serializable {
    /**
     * 
     *
     * @mbg.generated Fri Mar 05 20:38:22 CST 2021
     */
    private Long uid;

    /**
     * 
     *
     * @mbg.generated Fri Mar 05 20:38:22 CST 2021
     */
    private String username;

    /**
     * 
     *
     * @mbg.generated Fri Mar 05 20:38:22 CST 2021
     */
    private String sex;

    /**
     * 
     *
     * @mbg.generated Fri Mar 05 20:38:22 CST 2021
     */
    private String address;

    /**
     * 
     *
     * @mbg.generated Fri Mar 05 20:38:22 CST 2021
     */
    private String phone;

    /**
     * 
     *
     * @mbg.generated Fri Mar 05 20:38:22 CST 2021
     */
    private String signature;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table user
     *
     * @mbg.generated Fri Mar 05 20:38:22 CST 2021
     */

    private List<Tag> tagList;

    private List<FriendGroup> friendGroupList;

    private List<Friend> friendList;

    private static final long serialVersionUID = 1L;

    public User() {
    }

    public User(String username) {
        this.username = username;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return Objects.equals(uid, user.uid) ||
                Objects.equals(username, user.username);
    }

    @Override
    public int hashCode() {
        return Objects.hash(uid, username);
    }

}